//
//  HotSellerMoreCollectionViewCell.m
//  GiftItems
//
//  Created by lanou3g on 15/9/19.
//  Copyright (c) 2015年 lanou3g. All rights reserved.
//

#import "HotSellerMoreCollectionViewCell.h"
#import "HotSellerMoreModel.h"

@implementation HotSellerMoreCollectionViewCell
// 利用传来的Model赋值
- (void)setValueOfAttributesWithModel:(HotSellerMoreModel *)model {
    [self.picImage sd_setImageWithURL:[NSURL URLWithString:model.icon_url]];
    self.name.text = model.name;
}
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame: frame];
    if (self) {
        [self addSubviews];
    }
    return self;
}

- (void)addSubviews {
    self.picImage = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.frame.size.width, 75)];
    self.picImage.layer.masksToBounds = YES;
    self.picImage.layer.cornerRadius = 10;
    [self.contentView addSubview:self.picImage];
    
    self.name = [[UILabel alloc] initWithFrame:CGRectMake(0, 75, self.frame.size.width, 35)];
    self.name.textColor = kRGB(255.0, 235.0,255.0);
    self.name.textAlignment = NSTextAlignmentCenter;
    self.name.numberOfLines = 2;
    self.name.font = [UIFont boldSystemFontOfSize:12.0];
    [self.contentView addSubview:self.name];
}

@end
